package com.mbigger.synchronize;

/**
 * 可重入粒度测试，调用父类的同步方法
 * 
 * @author mbigg
 *
 */
class BaseClass {

    public synchronized void doSomething() {
        System.err.println("我是父类方法");
    }

}

public class SynchronizedSuperClass12 extends BaseClass {

    public synchronized void doSomething() {
        System.err.println("我是子类方法");
        super.doSomething();
    }

    public static void main(String[] args) {
        SynchronizedSuperClass12 instance = new SynchronizedSuperClass12();
        instance.doSomething();
    }
}
